package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"hotgo/internal/library/wechat"
	"hotgo/internal/model/entity"
	"hotgo/internal/model/input/adminin"
	"hotgo/internal/model/input/form"
	"hotgo/internal/model/input/sysin"
)

type BankCardInfoReq struct {
	g.Meta     `path:"/bank/card/info" method:"get" tags:"API-钱包" summary:"获取银行卡信息"`
	BankCardNo string `json:"bank_card_no" v:"required#银行卡号不能为空" dc:"银行卡号"`
}

type BankCardInfoRes struct {
	*wechat.GetBankByNumResp
}

type StoreBankCardBindReq struct {
	g.Meta `path:"/store/bank/card/bind" method:"post" tags:"API-钱包" summary:"绑定银行卡"`
	sysin.WalletStoreBankAPIEditInp
}

type StoreBankCardBindRes struct {
	*sysin.WalletStoreBankAPIEditModel
}

type StoreBankCardBindSmsSendReq struct {
	g.Meta `path:"/store/bank/card/bind/sms/send" method:"post" tags:"API-钱包" summary:"绑定银行卡发送验证码"`
	Mobile string `json:"mobile" v:"required#手机号不能为空" dc:"手机号"`
}

type StoreBankCardBindSmsSendRes struct {
}

// 获取商户钱包信息
type StoreWalletInfoReq struct {
	g.Meta  `path:"/store/wallet/info" method:"get" tags:"API-钱包" summary:"获取商户钱包信息"`
	StoreId int64 `json:"storeId" v:"required#商户ID不能为空" dc:"商户ID"`
}

type StoreWalletInfoRes struct {
	*entity.WalletStoreBank
	BankIcon    string  `json:"bankIcon" description:"银行图标"`
	Mobile      string  `json:"mobile" description:"手机号"`
	Balance     float64 `json:"balance" description:"余额"`
	TotalIncome float64 `json:"totalIncome" description:"总收入"`
	Fee         float64 `json:"fee" description:"手续费"`
}

// 钱包提现
type WalletWithdrawReq struct {
	g.Meta `path:"/wallet/withdraw" method:"post" tags:"API-钱包" summary:"钱包提现"`
	sysin.WalletWithdrawInp
}

type WalletWithdrawRes struct {
}

// PaymentNotifyReq 打款回调
type PaymentNotifyReq struct {
	g.Meta `path:"/cash/payment/notify" method:"post" tags:"提现" summary:"提现打款处理回调"`
	adminin.CashPaymentNotifyInp
}

type PaymentNotifyRes struct {
	g.Meta     `mime:"text/html" type:"string" example:"<html/>"`
	StatusCode string `json:"statusCode"`
	Message    string `json:"message"`
}

// 资金变动记录
type WalletChangeLogReq struct {
	g.Meta `path:"/wallet/credits/log" method:"get" tags:"API-钱包" summary:"获取钱包变动记录"`
	adminin.WalletCreditsLogInp
}

type WalletChangeLogRes struct {
	List []*adminin.WalletCreditsLogModel
	form.PageRes
}

// 提现到微信钱包
type WalletWithdrawToWechatReq struct {
	g.Meta `path:"/wallet/withdraw/to/wechat" method:"post" tags:"API-钱包" summary:"提现到微信钱包"`
	adminin.WalletWithdrawToWechatInp
}

type WalletWithdrawToWechatRes struct {
	adminin.WalletWithdrawToWechatModel
}

// 佣金统计
type WalletCommissionStatReq struct {
	g.Meta `path:"/wallet/commission/stat" method:"get" tags:"API-钱包" summary:"佣金统计"`
}

type WalletCommissionStatRes struct {
	adminin.WalletCommissionStatModel
}
